var events = require('events'); 
//新建 emitter
var emitter = new events.EventEmitter(); 

//第一个监听
emitter.on('someEvent', function(arg1, arg2) { 
    console.log('listener1', arg1, arg2); 
}); 
emitter.on('someEvent', function(arg1, arg2) { 
    console.log('listener2', arg1, arg2); 
}); 

//同时调用两个
emitter.emit('someEvent', 'arg1', 'arg2'); 